import 'dart:convert';

import 'package:grocery_app_demo/generated/json/base/json_field.dart';
import 'package:grocery_app_demo/generated/json/wait_for_purchase_goods_entity.g.dart';

@JsonSerializable()
class WaitForPurchaseGoodsEntity {
  String? goodsCode;
  String? goodsName;
  int? count;
  int? weight;
  int? shipperId;
  String? shipperName;
  String? unit;
  int? standardWeight;
  List<WaitForPurchaseGoodsOrders>? orders;

  WaitForPurchaseGoodsEntity();

  factory WaitForPurchaseGoodsEntity.fromJson(Map<String, dynamic> json) =>
      $WaitForPurchaseGoodsEntityFromJson(json);

  Map<String, dynamic> toJson() => $WaitForPurchaseGoodsEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class WaitForPurchaseGoodsOrders {
  int? orderId;
  String? orderNumber;
  int? count;
  String? consignee;
  String? mobilePhone;
  String? provinceName;
  String? cityName;
  String? areaName;
  String? villageName;
  String? address;
  String? stationTime;

  WaitForPurchaseGoodsOrders();

  factory WaitForPurchaseGoodsOrders.fromJson(Map<String, dynamic> json) =>
      $WaitForPurchaseGoodsOrdersFromJson(json);

  Map<String, dynamic> toJson() => $WaitForPurchaseGoodsOrdersToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
